package com.ytf.test.sixth;

import com.ytf.test.sixth.dessert.DessertCookie;

/**
 * @author: YTF
 * @date: 2024/9/23 12:32
 * @version: 1.0
 * @description:
 */
public class ChocolateChip extends DessertCookie {
    public ChocolateChip() {
        System.out.println("ChocolateChip constructor");
    }
    public void chomp(){
        //! bit(); //Can't access bit 不在范围无法访问
        protectedBite(); // protected 使用继承后就可以使用这个方法
    }

    public static void main(String[] args) {
        ChocolateChip chocolateChip =new ChocolateChip();
        chocolateChip.chomp();
        /**
         * Output:
         *  DessertCookie constructor
         *  ChocolateChip constructor
         *  protectedBite
         *
         * 总结：
         *  注意范围
         */
    }
}
